FROM eclipse-temurin:8-jre
# FROM openjdk:8-jre

RUN mkdir -p /server
WORKDIR /server

COPY ./target/server-0.0.1-SNAPSHOT.jar app.jar
COPY ./src/main/resources/logback-spring.xml logback-spring.xml
RUN mkdir logs
RUN mkdir file
RUN chmod 777 logs
RUN chmod 777 file

ENV TZ=Asia/Shanghai
ENV JAVA_OPTS="-Xms512m -Xmx512m -Djava.security.egd=file:/dev/./urandom"
ENV ARGS=""

CMD java ${JAVA_OPTS} -jar app.jar $ARGS

EXPOSE 28080
